package com.struct.factory{
	/**
	 * 创建者：薛恒杰
	 * 工程名称：Marbles
	 * 创建时间：Aug 6, 2012 5:03:04 PM
	 * 类说明：GameSceneFactory.as,
	 */
	import com.struct.graph.scene.GameScene;
	import com.struct.graph.scene.GameSceneGraphWorker;
	
	import sacu.s.Factory;
	
	public class GameSceneFactory extends Factory{
		private var gameScene:GameScene;
		private var gameSceneGW:GameSceneGraphWorker;
		public function GameSceneFactory(Name:String)
		{
			super(Name);
		}
		override protected function onInitFactory():void{
			super.onInitFactory();
			gameScene = new GameScene();
			gameSceneGW = new GameSceneGraphWorker("GameSceneGraphWorker", gameScene);
		}
		override protected function onStartFactory():void{
			registerGraphicsWorker(gameSceneGW);
			SSA.application.mapLayer.addChild(gameScene);
			gameScene.loadInfo();
		}
		override public function disposeFactory():void{
			super.disposeFactory();
			removeGraphicsWorker(gameSceneGW.eName);
			SSA.application.mapLayer.removeChild(gameScene);
		}
	}
}